/**
* NFT 身份页面
*/
<template>
	<view class="nft_container_bg">
		<z-paging ref="paging" v-model="neftList" @query="queryList" empty-view-img="../../static/img/nullData.png" empty-view-text="暂无数据">
			<view class="profile_photo">
				<view class="nft_lists_card">
					<nft-card v-for="item in neftList" :item="item" @changeUrl="changeUrl(item.grade)"
						:imgSrc="item.gradeCover" cardType="identityCard">
					</nft-card>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import {
		getPositionByTenantId
	} from '@/config/nftApi.js';
	export default {
		data() {
			return {
				neftList: [],
				tenantId: ''
			}
		},
		created() {
			this.tenantId = getApp().globalData.tenantId
		},
		methods: {
			queryList(pageNo, pageSize) {
				getPositionByTenantId({
					pageNo,
					pageSize,
					tenantId: this.tenantId
				}).then(res => {
					console.log('res', res)

					this.$refs.paging.completeByTotal(res?.data, res?.pagination?.totalSize);
				})
			},
			changeUrl(grade) {
				uni.navigateTo({
					url: "/pages/nft/nftDetail?exhibitionType=" + "identity&grade=" + grade
				})
			}
		}
	}
</script>

<style lang="scss">
	.nft_container_bg {
		min-height: 100vh;
		background: $echo-nft-bg-color;

		.nft_lists_card {
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			padding: 30rpx 30rpx;
		}
	}
</style>
